package com.example.demo.vo;

@Deprecated
public class AnalyseResult {
    // 以下3个是经jieba工具分解后直接得出的词，一般都比较稀碎
    KV[] nouns;         // 名词
    KV[] verbs;         // 动词
    KV[] adjs;          // 形容词

    // 以下是jieba工具结合正则表达式等方法分割的词，一般比较完整
    KV[] dates;         // 日期
    KV[] names;         // 人名
    KV[] addresses;     // 地址
    KV[] courts;        // 法院
    KV[] sex;           // 性别
    KV[] couses;        // 案由
    KV[] nations;       // 民族

    public KV[] getNouns() { return nouns; }
    public KV[] getVerbs() { return verbs; }
    public KV[] getAdjs() { return adjs; }
    public KV[] getDates() { return dates; }
    public KV[] getNames() { return names; }
    public KV[] getAddresses() { return addresses; }
    public KV[] getCourts() { return courts; }
    public KV[] getSex() { return sex; }
    public KV[] getCouses() { return couses; }
    public KV[] getNations() { return nations; }

    public void setNouns(String[] nounsArr) {
        this.nouns = new KV[nounsArr.length];
        for (int i = 0; i < this.nouns.length; i++) {
            this.nouns[i] = new KV("名词", nounsArr[i]);
        }
    }

    public void setVerbs(String[] verbsArr) {
        this.verbs = new KV[verbsArr.length];
        for (int i = 0; i < this.verbs.length; i++) {
            this.verbs[i] = new KV("动词", verbsArr[i]);
        }
    }

    public void setAdjs(String[] adjsArr) {
        this.adjs = new KV[adjsArr.length];
        for (int i = 0; i < this.adjs.length; i++) {
            this.adjs[i] = new KV("形容词", adjsArr[i]);
        }
    }

    public void setDates(String[] datesArr) {
        this.dates = new KV[datesArr.length];
        for (int i = 0; i < this.dates.length; i++) {
            this.dates[i] = new KV("名词", datesArr[i]);
        }
    }

    public void setNames(String[] peopleNamesArr) {
        this.names = new KV[peopleNamesArr.length];
        for (int i = 0; i < this.names.length; i++) {
            this.names[i] = new KV("名词", peopleNamesArr[i]);
        }
    }

    public void setAddresses(String[] addressesArr) {
        this.addresses = new KV[addressesArr.length];
        for (int i = 0; i < this.addresses.length; i++) {
            this.addresses[i] = new KV("名词", addressesArr[i]);
        }
    }

    public void setCourts(String[] courtsArr) {
        this.courts = new KV[courtsArr.length];
        for (int i = 0; i < this.courts.length; i++) {
            this.courts[i] = new KV("名词", courtsArr[i]);
        }
    }

    public void setNations(String[] nationsArr) {
        this.nations = new KV[nationsArr.length];
        for (int i = 0; i < this.nations.length; i++) {
            this.nations[i] = new KV("名词", nationsArr[i]);
        }
    }

    public void setSexs(String[] sexsArr) {
        this.sex = new KV[sexsArr.length];
        for (int i = 0; i < this.sex.length; i++) {
            this.sex[i] = new KV("名词", sexsArr[i]);
        }
    }

    public void setCouses(String[] cousesArr) {
        this.couses = new KV[cousesArr.length];
        for (int i = 0; i < this.couses.length; i++) {
            this.couses[i] = new KV("名词", cousesArr[i]);
        }
    }

    class KV {
        public String characteristic;
        public String word;

        public KV(String characteristic, String word) {
            this.characteristic = characteristic;
            this.word = word;
        }
    
        public String getCharacteristic() {
            return characteristic;
        }

        public String getWord() {
            return word;
        }
    }
}
